using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;

namespace Roommate.UnitTests.Web
{
    public static class TestExtensions
    {
        public static T AssertPayloadIs<T>(this System.Web.Mvc.JsonResult result) where T:class
        {
            var temp = result.Data as T;
            Assert.That(temp,Is.Not.Null,"Payload is not of expected type");
            return temp;

        }


    }
}